home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 236 < prev    next >
Encoding:
Text File  |  1996-08-06  |  1.2 KB  |  33 lines

  1. Newsgroups: comp.lang.c,comp.std.c
  2. Path: hobbes.sco.COM!scocan!john
  3. From: john@sco.com (John R MacMillan)
  4. Subject: Re: Integral conversion e.t.c. (was: Re: Hungarian notation)
  5. Organization: SCO Canada, Inc.
  6. Date: Tue, 30 Jan 1996 17:11:06 GMT
  7. Message-ID: <DM07qJ.CI6@sco.COM>
  8. References: <30C40F77.53B5@swsbbs.com> <KANZE.96Jan29121956@slsvewt.lts.sel.alcatel.de> <TANMOY.96Jan29090518@qcd.lanl.gov> <KANZE.96Jan29201312@slsvewt.lts.sel.alcatel.de>
  9. Sender: news@sco.COM (News administration)
  10.  
  11. |Try naming a global function read, and see what happens (on most
  12. |compilers, anyway).
  13.  
  14. I think more and more SDKs are getting this ``right'', at least in the
  15. UNIX environment, because a) the C standard has been stable long
  16. enough that we're all over adding ``const'' and prototypes and have
  17. time to concentrate on issues like namespace pollution, and b) we have
  18. to deal with number of standards like ISO C, POSIX, XPG{3,4,4.2}, plus
  19. historical usage, and so on.  Since these have different requirements
  20. and we have to pass all the test suites, we've had to solve many of
  21. these issues.
  22.  
  23. $ cat foo.c
  24. #include <stdio.h>
  25.  
  26. int write(int n) { return n + 1; }
  27.  
  28. int main(void) { printf("%d\n", write(41)); return 0; }
  29. $ cc foo.c -o foo
  30. $ ./foo
  31. 42
  32.